/*
 * @Author: yumao 123456
 * @Date: 2025-09-03 15:34:41
 * @LastEditors: yumao 123456
 * @LastEditTime: 2025-09-03 15:37:11
 * @FilePath: \龙飞\src\api\flowRate.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
import { downloadExcel } from '@/utils/util'

const modelApi = {
  StatisticsToday: '/modelApi/statisticsToday',
  Statistics: '/modelApi/statistics',
  ExportStatistics: '/modelApi/exportStatistics',
}

export function statisticsToday(parameter) {
  return request({
    url: modelApi.StatisticsToday,
    method: 'get',
    params: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  })
}

export function statistics(parameter) {
  return request({
    url: modelApi.Statistics,
    method: 'get',
    params: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
  })
}

/**
 * 调用PDF
 */
export function exportStatistics(parameter, option) {
  return downloadExcel(request, modelApi.ExportStatistics, parameter, option)
}
